package siyuan.run.sentinel;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: sy
 * @description:
 * @author: SY
 * @create: 2020-12-17 12:41
 **/
@SpringBootApplication
public class SentinelApplication {

    public static void main(String[] args) {
        SpringApplication.run(SentinelApplication.class,args);
    }

    @RestController
    public class SentinelController{

        @GetMapping("hello")
        @SentinelResource("hello")
        public String hello(){
            return "sentinel hello";
        }

    }

}
